﻿<UserControl x:Class="SimlvClient.Pages.UserList"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="700">
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="15" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="5">
            <Button Content="添加" Click="AddCommand" Width="75" Margin="0,0,0,0">

            </Button>
            <Button Content="修改" Click="EditCommand" Width="75" Margin="5,0,0,0">

            </Button>
            <Button Content="删除" Click="DeleteCommand" Width="75" Margin="5,0,0,0">

            </Button>
        </StackPanel>
        <ScrollViewer Grid.Row="1">
            <StackPanel MinWidth="200">

                <DataGrid x:Name="gridNews" SelectionMode="Single"  AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False"  CanUserReorderColumns="False" >
                    <DataGrid.Columns>

                        <DataGridTextColumn IsReadOnly="True" Header="编号" Binding="{Binding Path=Id}"/>
                        <DataGridTextColumn IsReadOnly="True" Width="*" Header="用户名" Binding="{Binding Path=UserName}" />
                    </DataGrid.Columns>
                </DataGrid>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
